<template>
    <div class="common-table">
        <el-table :data="tableData" style="height: 90%" stripe  v-loading="config.loading">
            <el-table-column
                    prop="id"
                    label="编号"
                    width="200">
            </el-table-column>
            <el-table-column
                    prop="real_name"
                    label="姓名"
                    width="200">
            </el-table-column>
            <el-table-column
                    prop="login_name"
                    label="用户名"
                    width="200">
            </el-table-column>
            <el-table-column
                    prop="phone"
                    label="电话"
                    width="200">
            </el-table-column>
            <el-table-column
                    prop="email"
                    label="电子邮箱"
                    width="200">
            </el-table-column>

            操作列
            <el-table-column label="操作" >
            <template slot-scope="scope">
            <el-button
            size="mini"
            @click="handleEdit(scope.row)">编辑</el-button>
            <el-button
            size="mini"
            type="danger"
            @click="handleDelete(scope.row)">删除</el-button>
            </template>
            </el-table-column>

        </el-table>

    </div>
</template>

<script>
    export default {
        name: "CommonTable",
        props:{
            tableData:Array,
            tableLabel:   Array,
            config:Object
        },
        methods:{
            handleEdit(row){
this.$emit('edit',row)
            },
            handleDelete(row){
                this.$emit('del',row)
            },
            changePage(page){
                this.$emit('changPage',page)
            },

        }
    }
</script>

<style scoped>
.common-table{
    height: calc(100% - 62px);
    background-color: #fff;
    position:relative;

}
.pager{
    position: absolute;
    bottom: 20px;
    right: 20px;
}
</style>